<title>优惠券管理</title>
<link type="text/css" href="${ctx}/resources/css/ace.min.1.css"  rel="stylesheet" />
<table>
<th>状态:</th>
<th width="70px;" class="label label-sm label-light arrowed"> <a href="${ctx}/admin/coupon/list${suffix}?state=2" >全部</a> </th>
<th width="70px;" class="label label-sm label-success arrowed"> <a href="${ctx}/admin/coupon/list${suffix}?state=1" >有效</a> </th>
</tr>
</table>
<div class="row">
	<div class="col-xs-12">
		<div class="table-responsive">
			<table id="sample-table-1" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th>ID</th>
						<th>券名</th>
						<th>券额(￥)</th>
						<th>所属用户id</th>
						<th>有效开始时间</th>
						<th>过期时间</th>
						<th>发券时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
				<#list pager.itemList as u>
					<tr>
						<td><span class="gray center">${u.id!}</span></td>
						<td><span class="gray center">${u.name!}</span></td>
						<td><span class="green center">${u.price!}</span></td>
						<td><span class="green center">${u.userId!}</span></td>
						<td><span class="green center">${u.startTime!}</span></td>
						<td><span class="green center">${u.endTime!}</span></td>
						<td>${u.createTime!}</td>
						<td>
							<div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">
								<a class="red" href="${ctx}/admin/coupon/${u.id}/delete${suffix}" onclick="return confirm('你确定删除么?');" alt="Delete">
									<i class="icon-trash bigger-130"></i>
								</a>
							</div>
						</td>
					</tr>
				</#list>
				</tbody>
			</table>
		</div><!-- /.table-responsive -->
		<div class="hr hr-18 dotted hr-double"></div>
		<@h.page pager=pager action="${ctx}/admin/coupon/list" />
		
	</div><!-- /span -->
	
</div><!-- /row -->

<#if errorMsg??>
	<div class="hr hr-18 hr-double dotted"></div>
	<h4 class="lighter">
		<i class="icon-hand-right icon-animated-hand-pointer red"></i>
		<span class="pink">${errorMsg}</span>
	</h4>
</#if>

<#if infoMsg??>
	<div class="hr hr-18 hr-double dotted"></div>
	<h4 class="lighter">
		<i class="icon-hand-right icon-animated-hand-pointer green"></i>
		<span class="pink">${infoMsg}</span>
	</h4>
</#if>
<script>
	$(document).ready(function(){
		RP.addBreadcrumb([{name:"基础配置"}, {name:"优惠券", active: true}]);
		$("#breadcrumbs ul").append('&nbsp;&nbsp;&nbsp;&nbsp;<a href="${ctx}/admin/coupon/add${suffix}"><i class="icon-zoom-in"></i><span class="label label-warning arrowed-in arrowed-in arrowed-right">添加优惠券</span></a>');
	});
</script>